# Once done, this will define
#
#  libcryptopp_INCLUDE_DIR - the libcryptopp include directory
#  libcryptopp_LIBRARY_DIR - the libcryptopp library directory
#  libcryptopp_LIBS - link these to use libcryptopp
#
#  ......

MACRO(LOAD_LIBlibcryptopp os arch)
    MESSAGE(INFO "--------------------------------")
    SET(3RDPARTY_DIR ${PROJECT_SOURCE_DIR}/3rdparty/target/${${os}}_${${arch}})
    MESSAGE(STATUS "3RDPARTY_DIR: ${3RDPARTY_DIR}")
    #FIND_FILE(libcryptopp_INCLUDE_DIR include ${3RDPARTY_DIR} NO_DEFAULT_PATH)
    #FIND_FILE(libcryptopp_LIBRARY_DIR lib ${3RDPARTY_DIR} NO_DEFAULT_PATH)
    SET(libcryptopp_INCLUDE_DIR ${PROJECT_SOURCE_DIR}/3rdparty/target/${${os}}_${${arch}}/include/cryptopp850)
    SET(libcryptopp_LIBRARY_DIR ${PROJECT_SOURCE_DIR}/3rdparty/target/${${os}}_${${arch}}/lib)

    IF (CMAKE_SYSTEM_NAME MATCHES "Linux")
        SET(libcryptopp_LIBS cryptopp)
    ELSEIF (CMAKE_SYSTEM_NAME MATCHES "Windows")
       SET(libcryptopp_LIBS cryptopp)
    ENDIF (CMAKE_SYSTEM_NAME MATCHES "Linux")

    IF(libcryptopp_INCLUDE_DIR)
        SET(libcryptopp_LIBRARY_DIR "${libcryptopp_LIBRARY_DIR}/cryptopp850")
        #SET(libcryptopp_LIBS "${libcryptopp_LIBRARY_DIR}/libcryptopp.so")
        MESSAGE(STATUS "libcryptopp_INCLUDE_DIR : ${libcryptopp_INCLUDE_DIR}")
        MESSAGE(STATUS "libcryptopp_LIBRARY_DIR : ${libcryptopp_LIBRARY_DIR}")
        MESSAGE(STATUS "libcryptopp_LIBS : ${libcryptopp_LIBS}")
    ELSE()
        MESSAGE(FATAL_ERROR "libcryptopp_LIBS not found!")
    ENDIF()
ENDMACRO()
